package xin.yangshuai.basic01.download;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * FileInfoController
 *
 * @author shuai
 * @date 2020/10/27
 */
@Controller
@RequestMapping("fileInfo")
public class FileInfoController {

    private static final Logger log = LoggerFactory.getLogger(FileInfoController.class);

    @ResponseBody
    @RequestMapping(value = "receive", method = {RequestMethod.POST, RequestMethod.GET})
    public void receive(String fileUrl, String filename, HttpServletRequest request, HttpServletResponse response) throws Exception {
        DownloadUtils1.receive(fileUrl, filename, request, response);
    }

}
